<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <title>订单列表</title>
    <link rel="stylesheet" th:href="@{/css/commons.css}"/>
    <script type="text/javascript" th:src="@{/js/jquery-3.6.0.min.js}"></script>
</head>
<body>
<div>
    <table class="order-list">
        <tr>
            <th>订单序号</th>
            <th>商品名称</th>
            <th style="width: 100px">商品数量</th>
            <th style="width: 100px">商品价格</th>
            <th style="width: 100px">商品状态</th>
            <th style="width: 100px">操作</th>
        </tr>
        <tr th:each="order : ${orders}">
            <th th:text="${order.id}"></th>
            <th th:text="${order.name}"></th>
            <th th:text="${order.count}"></th>
            <th th:text="${order.price + '.00元'}"></th>
            <th th:text="${order.getStatusLabel()}"></th>
            <th>
                <form action="/order/payment_exec" method="post">
                    <input type="hidden" name="uid" th:value="${order.userId}"/>
                    <input type="hidden" name="oid" th:value="${order.orderId}"/>
                    <button type="submit" th:if="${order.status == 1}">进行支付</button>
                </form>
            </th>
        </tr>
    </table>
</div>


</body>
</html>
